if __name__ == "__main__":
    T = int(input())
    if T <= 0:
        exit()
    for i in range(T):
        count = 0
        n = int(input())
        # print(n)
        a = input().strip().split()
        # print(a)
        for each in range(n):
            if int(a[each]) > 100:
                exit()
        for c in range(n):
            if int(a[c])<=10:
                count+=1
        print(count)